﻿#region Copyright Info

// 
// Majesty of Omega - The next evolution of macro management space strategy
// 
// Copyright 2007-2009 André Claaßen
// 
// This file is protected by the terms and conditions of the
// Microsoft Community License (Ms-CL 1.1), a copy of which should
// have been distributed along with this software. If not,
// you may find the license information at the following URL:
// 
// http://www.microsoft.com/resources/sharedsource/licensingbasics/communitylicense.mspx

#endregion

#region

#endregion

using Majesty_of_Omega.GUI.Controller;
using DesignByContract;

namespace Majesty_of_Omega.GUI.Pages.Game.SitReport
{
    /// <summary>
    /// The SitReportPage displays the contents of the situation report.
    /// </summary>
    public partial class SitReportPage
    {
        /// <summary>
        /// The controller for this page
        /// </summary>
        private readonly SitReportController sitReportController;

        /// <summary>
        /// Initializes a new instance of the <see cref="SitReportPage"/> class.
        /// </summary>
        /// <remarks>
        /// Constructor for editing purposes in Blend
        /// </remarks>
        public SitReportPage()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SitReportPage"/> class.
        /// </summary>
        /// <param name="controller">The controller.</param>
        /// <remarks>
        /// Constructor for the real game
        /// </remarks>
        public SitReportPage(SitReportController controller)
        {
            sitReportController = controller;
            InitializeComponent();
            
            // Map the Controller to the grid in the xaml file
            LayoutRoot.DataContext = controller;
        }

        /// <summary>
        /// Gets the controller for this page
        /// </summary>
        /// <remarks>
        /// 
        /// </remarks>
        /// <value>The controller.</value>
        public SitReportController SitReportController
        {
            get
            {
                Require.IsNotNull(sitReportController);
                return sitReportController;
            }
        }

        /// <summary>
        /// Handles the Click event of the Hyperlink control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void Hyperlink_Click(object sender, System.Windows.RoutedEventArgs e)
        {

        }
    }
}